﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _6.适配器模式
{
    class Program
    {
        static void Main(string[] args)
        {
            Target target = new Adapter();
            target.Request();
            Console.Read();
        }
    }
    class Target
    {
        public virtual void Request()
        {
            Console.WriteLine("普通请求");
        }
    }
    class Adapter : Target
    {
        Adaptee adaptee = new Adaptee();
        public override void Request()
        {
            adaptee.SpecificRequest();
        }
    }
    class Adaptee
    {
        public void SpecificRequest()
        {
            Console.WriteLine("我是需要适配的类");
        }
    }
 
}
